.class public final Llt/farmis/libraries/apps_promo/views/AppPromoItemView;
.super Landroid/widget/LinearLayout;
.source "AppPromoItemView.kt"


# instance fields
.field private _$_findViewCache:Ljava/util/HashMap;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1

    const-string v0, "context"

    invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    .line 16
    invoke-direct {p0, p1}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

    .line 18
    sget v0, Llt/farmis/libraries/apps_promo/R$layout;->apps_promo_item:I

    invoke-static {p1, v0, p0}, Landroid/widget/LinearLayout;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;

    return-void
.end method

.method public static final synthetic access$getViewIntent(Llt/farmis/libraries/apps_promo/views/AppPromoItemView;Ljava/lang/String;)Landroid/content/Intent;
    .locals 0

    .line 16
    invoke-direct {p0, p1}, Llt/farmis/libraries/apps_promo/views/AppPromoItemView;->getViewIntent(Ljava/lang/String;)Landroid/content/Intent;

    move-result-object p0

    return-object p0
.end method

.method private final getViewIntent(Ljava/lang/String;)Landroid/content/Intent;
    .locals 2

    .line 41
    new-instance v0, Landroid/content/Intent;

    invoke-static {p1}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object p1

    const-string v1, "android.intent.action.VIEW"

    invoke-direct {v0, v1, p1}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V

    return-object v0
.end method


# virtual methods
.method public _$_findCachedViewById(I)Landroid/view/View;
    .locals 2

    iget-object v0, p0, Llt/farmis/libraries/apps_promo/views/AppPromoItemView;->_$_findViewCache:Ljava/util/HashMap;

    if-nez v0, :cond_0

    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    iput-object v0, p0, Llt/farmis/libraries/apps_promo/views/AppPromoItemView;->_$_findViewCache:Ljava/util/HashMap;

    :cond_0
    iget-object v0, p0, Llt/farmis/libraries/apps_promo/views/AppPromoItemView;->_$_findViewCache:Ljava/util/HashMap;

    invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/view/View;

    if-nez v0, :cond_1

    invoke-virtual {p0, p1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    iget-object v1, p0, Llt/farmis/libraries/apps_promo/views/AppPromoItemView;->_$_findViewCache:Ljava/util/HashMap;

    invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object p1

    invoke-virtual {v1, p1, v0}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    :cond_1
    return-object v0
.end method

.method public final setModel(Llt/farmis/libraries/apps_promo/models/AppPromoModel;Z)V
    .locals 2

    const-string v0, "model"

    invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    .line 22
    sget v0, Llt/farmis/libraries/apps_promo/R$id;->appIconImageView:I

    invoke-virtual {p0, v0}, Llt/farmis/libraries/apps_promo/views/AppPromoItemView;->_$_findCachedViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    invoke-virtual {p1}, Llt/farmis/libraries/apps_promo/models/AppPromoModel;->getAppIcon()Landroid/graphics/drawable/Drawable;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 23
    sget v0, Llt/farmis/libraries/apps_promo/R$id;->appNameTextView:I

    invoke-virtual {p0, v0}, Llt/farmis/libraries/apps_promo/views/AppPromoItemView;->_$_findCachedViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    const-string v1, "appNameTextView"

    invoke-static {v0, v1}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    invoke-virtual {p1}, Llt/farmis/libraries/apps_promo/models/AppPromoModel;->getAppName()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    const-string v0, "appDescriptionTextView"

    if-eqz p2, :cond_0

    .line 26
    sget p2, Llt/farmis/libraries/apps_promo/R$id;->appDescriptionTextView:I

    invoke-virtual {p0, p2}, Llt/farmis/libraries/apps_promo/views/AppPromoItemView;->_$_findCachedViewById(I)Landroid/view/View;

    move-result-object p2

    check-cast p2, Landroid/widget/TextView;

    invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    invoke-virtual {p1}, Llt/farmis/libraries/apps_promo/models/AppPromoModel;->getAppDescription()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p2, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_0

    .line 28
    :cond_0
    sget p2, Llt/farmis/libraries/apps_promo/R$id;->appDescriptionTextView:I

    invoke-virtual {p0, p2}, Llt/farmis/libraries/apps_promo/views/AppPromoItemView;->_$_findCachedViewById(I)Landroid/view/View;

    move-result-object p2

    check-cast p2, Landroid/widget/TextView;

    invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    const/16 v0, 0x8

    invoke-virtual {p2, v0}, Landroid/widget/TextView;->setVisibility(I)V

    .line 31
    :goto_0
    new-instance p2, Llt/farmis/libraries/apps_promo/views/AppPromoItemView$setModel$1;

    invoke-direct {p2, p0, p1}, Llt/farmis/libraries/apps_promo/views/AppPromoItemView$setModel$1;-><init>(Llt/farmis/libraries/apps_promo/views/AppPromoItemView;Llt/farmis/libraries/apps_promo/models/AppPromoModel;)V

    invoke-virtual {p0, p2}, Landroid/widget/LinearLayout;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    return-void
.end method
